package cn.edu.scau.cmi.wujiaxian.exercise2;

public class Rectangle {
	double width;
	double bottom;

	double getArea() {
		double area = width * bottom;
		return area;
	}
}

class Example2_4 {
	public static void main(String[] args) {
		Rectangle r = new Rectangle();
		r.width = 1.819;
		r.bottom = 1.5;
		double area = r.getArea();
		System.out.println("矩形的面积:" + area);
	}
}
